//
//  MeTableViewController.m
//  新浪微博
//
//  Created by hbl on 16/2/14.
//  Copyright © 2016年 hbl. All rights reserved.
//

#import "MeTableViewController.h"
#import "NextTempTableViewController.h"
#import "BLGroup.h"
#import "BLItem.h"
#import "BLSettingTableViewCell.h"
#import "SettingTableViewController.h"
@interface MeTableViewController ()

@end


@implementation MeTableViewController



- (void)group1
{
    BLGroup *group1 = [[BLGroup alloc]init];
    BLItem *newFriend = [BLItem ItemWithTitle:@"新的好友" subTitle:@"" icon:@"new_friend" number:@"new" option:nil destClass:nil type:BLItemTypeNumber];
    
    group1.Items = @[newFriend];
    [self.groups addObject:group1];
}

- (void)group2
{
    BLGroup *group2 = [[BLGroup alloc]init];
    BLItem *myPhoto = [BLItem ItemWithTitle:@"我的相册" subTitle:@"" icon:@"album" number:@"" option:nil destClass:[NextTempTableViewController class] type:BLItemTypeArrow];
    BLItem *collect = [BLItem ItemWithTitle:@"我的收藏" subTitle:@"" icon:@"collect" number:@"" option:nil destClass:[NextTempTableViewController class] type:BLItemTypeArrow];
    BLItem *like = [BLItem ItemWithTitle:@"赞" subTitle:@"" icon:@"like" number:@"12" option:nil destClass:nil type:BLItemTypeNumber];
    group2.Items = @[myPhoto,collect,like];
    [self.groups addObject:group2];
}

- (void)group3
{
    BLGroup *group3 = [[BLGroup alloc]init];
    BLItem *pay = [BLItem ItemWithTitle:@"微博支付" subTitle:nil icon:@"pay" number:nil option:nil destClass:[NextTempTableViewController class] type:BLItemTypeArrow];
    BLItem *vip = [BLItem ItemWithTitle:@"会员中心" subTitle:nil icon:@"vip" number:nil option:nil destClass:[NextTempTableViewController class] type:BLItemTypeArrow];
    group3.Items = @[pay,vip];
    [self.groups addObject:group3];
}

- (void)group4
{
    BLGroup *group4 = [[BLGroup alloc]init];
    BLItem *myNameCard = [BLItem ItemWithTitle:@"我的名片" subTitle:nil icon:@"card" number:nil option:nil destClass:[NextTempTableViewController class] type:BLItemTypeArrow];
    BLItem *draft = [BLItem ItemWithTitle:@"草稿箱" subTitle:nil icon:@"draft" number:nil option:nil destClass:[NextTempTableViewController class] type:BLItemTypeArrow];
    group4.Items = @[myNameCard,draft];
    [self.groups addObject:group4];
}



- (void)viewDidLoad {
    [super viewDidLoad];
    [self setupBar];
    [self group1];
    [self group2];
    [self group3];
    [self group4];
   
}

- (void)leftitemClick
{
    [self.navigationController pushViewController:[[SettingTableViewController alloc] init] animated:YES];
}

- (void)setupBar
{
    UIBarButtonItem *rightitem = [[UIBarButtonItem alloc]initWithTitle:@"设置" style:UIBarButtonItemStyleDone target:self action:@selector(leftitemClick)];
    self.navigationItem.rightBarButtonItem = rightitem;
}
@end
